import React, { ReactElement } from "react";

class Highlight {
    ref: React.RefObject<ReactElement>;
    color: string;
    oldEle: ReactElement;


    constructor(ref: React.RefObject<ReactElement>, color: string) {
        this.ref = ref;
        this.color = color;
        // cloneElement
        this.oldEle = React.cloneElement(this.ref.current as ReactElement);
        console.log(this.ref, 'ref是什么')
    }
}

export default Highlight;
